package org.tea.inventory.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author hanzy
 * @description 订单节点状态
 * @date 2023年04月06日 14:03
 */
public enum OrderTypeEnum {
    SW_UNCONFIRMED(0, "待审核"),
    SW_CONFIRMED(1, "待发货"),
    SW_CANCEL(2, "作废"),
    KH_CONFIRMED(3, "待确认"),
    KH_CONFIRM(4, "确认"),
    KH_CANCEL(9, "员工反馈");

    @Getter
    @Setter
    private Integer code;
    @Getter
    @Setter
    private String content;

    OrderTypeEnum(Integer code, String content) {
        this.code = code;
        this.content = content;
    }

    public static String getContentByName(Integer code) {
        for (OrderTypeEnum productAttributeEnum : OrderTypeEnum.values()) {
            if (productAttributeEnum.getCode() == code) {
                return productAttributeEnum.getContent();
            }
        }
        return "";
    }
}
